package cn.trigram.example.designpattern.fsm.transition;


import cn.trigram.example.designpattern.fsm.StateContext;
import cn.trigram.example.designpattern.fsm.state.AbstractState;

/**
 * 转换过程对应的行为
 */
@FunctionalInterface
public interface TransitionFunction {

  /**
   * @return 返回是否转移成功
   */
  boolean transition(AbstractState previousState, AbstractState nextState, StateContext context);

}